projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d06f8cb
)
Check pointers before xfree.
author
oliskoli
<oliskoli>
Sun, 11 Jun 2006 18:23:07 +0000
(18:23 +0000)
committer
oliskoli
<oliskoli>
Sun, 11 Jun 2006 18:23:07 +0000
(18:23 +0000)
an1.c
patch
|
blob
|
history
diff --git
a/an1.c
b/an1.c
index 00e4ea73509655e0474b8f3614ddecc7a0b00448..134335ee2021a35002e80b864896c6d1b1adc09e 100644
(file)
--- a/
an1.c
+++ b/
an1.c
@@
-304,9
+304,9
@@
void Destroy_AN1_Waypoint( void *vwpt ) {
an1_waypoint_record *wpt = (an1_waypoint_record *)vwpt;
xfree( wpt->name );
xfree( wpt->fontname );
- xfree( wpt->url );
- xfree( wpt->comment );
- xfree( wpt->image_name );
+
if ( wpt->url )
xfree( wpt->url );
+
if ( wpt->comment )
xfree( wpt->comment );
+
if ( wpt->image_name )
xfree( wpt->image_name );
xfree( vwpt );
}